<extend name="_layout/main" />
<block name="content">
	<div class="page-content">
		<div class="page-breadcrumbs">
			<ul class="breadcrumb">
				<li>
					<i class="fa fa-home"></i>
					<a href="{:U('dashboard/index')}">系统首页</a>
				</li>
				<li class="active">幻灯片管理</li>
				<li>
					{$slider_info['name']}
				</li>
				<li class="active">图片管理</li>
			</ul>
		</div>
		<div class="page-body">
			<div class="row">
				<div class="col-lg-12 text-align-right margin-bottom-20">
					

							<a href="{:U('slider/item_add',['slider_id'=>$slider_id])}" class="btn btn-blue">
								<i class="fa fa-plus"></i> 添加图片
							</a>

				</div>
			</div>
			<div class="row">
				<div class="col-xs-12 col-md-12">
					<div class="widget">
						<div class="widget-header bordered-bottom bordered-blue">
							<span class="widget-caption">图片管理</span>
						</div>
						<div class="widget-body">
							<form action="{:U('slider/item_sort')}" method="post">
							<div>
								<table class="table">
									<thead>
										<tr>
											<th>排序</th>
											<th width="240">图片</th>
											<th>标题</th>
											<th>链接</th>
											<th>有效期</th>
											<th>状态</th>
											<th width="10%">操作</th>
										</tr>
									</thead>
									<tbody>
										<volist name="result" id="val">
											<tr>
												<td class="text-center input-group-xs" style="width: 80px;">
													<input type="text" class="form-control text-center" min="0" max="9999" maxlength="4" value="{$val.sort}" name="sort[{$val['id']}]">
												</td>
												<td><a href="{$val.pic}" target="_blank"><img src="{$val.pic}" width="200" height="60" /></a></td>
												<td>
													{$val.title}
												</td>
												<td>{$val.link}</td>
												<td>{$val.start_time|format_time=###,false}~{$val.end_time|format_time=###,false}</td>
												<td>
													<div class="btn-group">
													<eq name="val.status" value="1">
														<a class="btn btn-sm btn-palegreen">正常</a>
														<a class="btn btn-sm btn-palegreen dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-angle-down"></i></a>
														<ul class="dropdown-menu palegreen" role="menu">
															<li>
																<a href="{:U('slider/item_invalid',['id'=>$val['id']])}">关闭</a>
															</li>
														</ul>
														<else/>
													<a class="btn btn-sm btn-danger">关闭</a>
														<a class="btn btn-sm btn-danger dropdown-toggle" data-toggle="dropdown" aria-expanded="false"><i class="fa fa-angle-down"></i></a>
														<ul class="dropdown-menu danger" role="menu">
															<li>
																<a href="{:U('slider/item_valid',['id'=>$val['id']])}">正常</a>
															</li>
														</ul>
													</eq>
												</div>
													
												</td>
												<td>
													<a href="{:U('slider/item_edit',['id'=>$val['id']])}" class="btn btn-default btn-xs"><i class="fa  fa-edit"></i>编辑</a>
													<a href="{:U('slider/item_delete',['id'=>$val['id']])}" class="btn btn-danger btn-xs white " data-confirm="确定删除?"><i class="fa fa-trash-o"></i>删除</a>

												</td>
											</tr>
										</volist>
									</tbody>
								</table>
								<div class="row DTTTFooter">
									<div class="col-sm-6">
										<div class="dataTables_info" id="simpledatatable_info" role="status" aria-live="polite">
											<div class="buttons-preview">
												<button class="btn btn-default shiny" type="submit">排序</button>
											</div>
										</div>
									</div>
									<div class="col-sm-6">
										<div class="dataTables_paginate paging_bootstrap" id="simpledatatable_paginate">
											{$page}
										</div>
									</div>
								</div>
							</div>
							</form>
						</div>
					</div>
				</div>
			</div>
		</div>
	</div>
</block>

<block name="footer">

</block>